Skip to content

feat!: replace Uhura with the 0.4 machine-first language - #24

Merged
softmarshmallow merged 14 commits into
mainfrom
feature/uhura-0.4-language-rewrite
Jul 21, 2026
Merged

feat!: replace Uhura with the 0.4 machine-first language#24
softmarshmallow merged 14 commits into
mainfrom
feature/uhura-0.4-language-rewrite

Conversation

@softmarshmallow

@softmarshmallow softmarshmallow commented Jul 20, 2026

Copy link
Copy Markdown
Member

Status

Ready for review. This is the complete Uhura 0.4 machine-first replacement, not a compatibility scaffold. It is intentionally breaking and does not preserve an executable 0.3 source path.

Why

Uhura's previous state/store language worked, but its core model and authoring topology had not been designed with enough deliberate scrutiny. This branch rebuilds the language around Uhura's actual mission: a compact, deterministic state-machine language whose UI support is explicit and first-class, rather than the definition of the core language itself.

The source language is Rust-shaped for familiarity and bounded learnability, while the runtime remains a deterministic global kernel. Source modules, packages, parts, and imports are semantic authoring boundaries that compile into one checked IR.

What changed

  • defines and implements the Uhura 0.4 language candidate, grammar, kernel, project model, application profile, and conformance contract;
  • introduces an explicit MachineProgram kernel artifact inside the aggregate application Program;
  • provides one canonical 0.4 parser, project compiler, checker, runtime, and identity path;
  • removes executable 0.3 source support, .relay admission, compatibility loaders, legacy identity hashes, and the dev command alias;
  • makes evidence a manifest role using the same 0.4 frontend through [evidence.modules];
  • adds modular .uhura sources, typed state/events, deterministic effects and outcomes, packages, parts, provenance, evidence, snapshots, and explicit use uhura::ui;
  • centralizes the finite checked UI catalogue and gives Uhura-owned browser primitives explicit adapters;
  • makes semantic provenance mandatory across host, Editor, Wasm, and browser protocols;
  • migrates L0-L2, A0 Return Desk, and the complete Instagram corpus to native 0.4 source;
  • preserves the existing Editor and Play product surfaces, including preview organization, workflow traces, source provenance, runtime debugging, renderer semantics, and accessibility behavior;
  • closes the final Surface lifecycle, containment, focus restoration, route ownership, provider cleanup, and UI projection review findings;
  • bounds browser evidence transport with uhura-editor-state/5, uhura-machine-inspection/1, uhura-inspection/1, and the shared strict uhura-evidence-summary/0 contract;
  • keeps complete evidence internally for checking, replay, CLI, lineage, and navigation while publishing only summaries and source identities to Editor and Play;
  • adds deterministic payload caps and structural guards against reintroducing raw observation, snapshot, or receipt-log duplication;
  • makes loop-decrease proof erasure explicit and tests transitive conflicting versus disjoint update effects.

Performance result

The final review found that Editor and Play were publishing roughly 100 MiB of duplicated evidence data. This was a browser read-model/transport problem, not a kernel dispatch problem.

For the canonical Instagram application:

  • Editor state: 18,532,610 bytes, below the enforced 30 MiB cap;
  • Play inspection: 962,639 bytes, below the enforced 2 MiB cap.

Validation

  • cargo fmt --all -- --check;
  • cargo clippy --offline --locked --workspace --all-targets -- -D warnings;
  • cargo test --offline --locked --workspace --all-targets;
  • corepack pnpm@10.11.0 -C web check — 45 files passed, 282 tests passed, 2 skipped;
  • paper acquisition packet check passed;
  • A0 reference oracle passed 25 validation groups;
  • direct Instagram check passed with 4 modules and 91 examples;
  • feed_like_refused_scenario expanded trace passed;
  • live Editor smoke published 91 previews across 18 groups with 93 evidence passes and zero failures;
  • live Play smoke reached Running; mobile/desktop frames, scrolling, contained Surface focus/inert/restore behavior, debugger, and restart were verified with no browser warnings or errors.

Current boundary

Uhura has no supported backward-compatibility surface. Historical pointers and explicit rejection tests remain as documentation and negative conformance evidence; they cannot admit or execute retired source.

Project-wide uhura fmt --check remains gated on RFC 0003 comment attachment: the formatter deliberately refuses to erase authored evidence comments. Rust formatting, source checking, nontrivial trace execution, browser contracts, and payload budgets are all covered by the current validation surface.

Final checkpoints

  • 38c194e — close final kernel, host, Editor, Play, renderer, protocol, performance, and regression-review gaps;
  • c02f19e — align the active Uhura 0.4 specifications, RFCs, widget boundary, and Instagram guidance.

Companion PR

Uhura should merge first. The Spock companion remains draft until its gitlink is synchronized to the resulting Uhura main revision and revalidated.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 309 files, which is 209 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b18ee538-eabf-40ce-ace3-80236934f6a2

📥 Commits

Reviewing files that changed from the base of the PR and between 2f7558a and c02f19e.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • examples/instagram/client/uhura.lock is excluded by !**/*.lock
📒 Files selected for processing (553)
  • .github/workflows/ci.yml
  • .gitignore
  • Cargo.toml
  • README.md
  • crates/uhura-base/src/canonical.rs
  • crates/uhura-base/src/codes.rs
  • crates/uhura-base/src/lib.rs
  • crates/uhura-check/Cargo.toml
  • crates/uhura-check/src/assets.rs
  • crates/uhura-check/src/catalog.rs
  • crates/uhura-check/src/checker.rs
  • crates/uhura-check/src/checker_ir.rs
  • crates/uhura-check/src/diagnostic.rs
  • crates/uhura-check/src/examples.rs
  • crates/uhura-check/src/fixture.rs
  • crates/uhura-check/src/icon_fonts.rs
  • crates/uhura-check/src/infer.rs
  • crates/uhura-check/src/lib.rs
  • crates/uhura-check/src/lower.rs
  • crates/uhura-check/src/manifest.rs
  • crates/uhura-check/src/markup.rs
  • crates/uhura-check/src/metadata.rs
  • crates/uhura-check/src/pipeline.rs
  • crates/uhura-check/src/preview.rs
  • crates/uhura-check/src/project_lock.rs
  • crates/uhura-check/src/project_manifest.rs
  • crates/uhura-check/src/replay.rs
  • crates/uhura-check/src/resolve.rs
  • crates/uhura-check/src/resource_manifest.rs
  • crates/uhura-check/src/style.rs
  • crates/uhura-check/src/types.rs
  • crates/uhura-check/src/ui_catalog/elements.rs
  • crates/uhura-check/src/ui_catalog/mod.rs
  • crates/uhura-check/src/v04.rs
  • crates/uhura-check/src/v04/references.rs
  • crates/uhura-check/src/v04/ui.rs
  • crates/uhura-check/src/v04_compile.rs
  • crates/uhura-check/src/v04_evidence.rs
  • crates/uhura-check/src/v04_parts.rs
  • crates/uhura-check/src/v04_provenance.rs
  • crates/uhura-check/src/v04_topology.rs
  • crates/uhura-check/src/v04_updates.rs
  • crates/uhura-check/tests/assets.rs
  • crates/uhura-check/tests/contracts_corpus.rs
  • crates/uhura-check/tests/icon_fonts.rs
  • crates/uhura-check/tests/navigation.rs
  • crates/uhura-check/tests/project_lock.rs
  • crates/uhura-check/tests/project_manifest.rs
  • crates/uhura-check/tests/v04_application_bridges.rs
  • crates/uhura-check/tests/v04_compile.rs
  • crates/uhura-check/tests/v04_evidence.rs
  • crates/uhura-check/tests/v04_instagram.rs
  • crates/uhura-check/tests/v04_modules.rs
  • crates/uhura-check/tests/v04_packages.rs
  • crates/uhura-check/tests/v04_parts.rs
  • crates/uhura-check/tests/v04_programs.rs
  • crates/uhura-check/tests/v04_provenance.rs
  • crates/uhura-check/tests/v04_returns.rs
  • crates/uhura-check/tests/v04_standard.rs
  • crates/uhura-check/tests/v04_ui.rs
  • crates/uhura-cli/Cargo.toml
  • crates/uhura-cli/src/bin/gen_assets.rs
  • crates/uhura-cli/src/cmd/check.rs
  • crates/uhura-cli/src/cmd/editor.rs
  • crates/uhura-cli/src/cmd/fmt.rs
  • crates/uhura-cli/src/cmd/graph.rs
  • crates/uhura-cli/src/cmd/mod.rs
  • crates/uhura-cli/src/cmd/play.rs
  • crates/uhura-cli/src/cmd/project.rs
  • crates/uhura-cli/src/cmd/trace.rs
  • crates/uhura-cli/src/fsio.rs
  • crates/uhura-cli/src/lib.rs
  • crates/uhura-cli/src/main.rs
  • crates/uhura-core/Cargo.toml
  • crates/uhura-core/src/TODO.md
  • crates/uhura-core/src/codec.rs
  • crates/uhura-core/src/decode.rs
  • crates/uhura-core/src/eval.rs
  • crates/uhura-core/src/event.rs
  • crates/uhura-core/src/evidence.rs
  • crates/uhura-core/src/graph.rs
  • crates/uhura-core/src/inspect.rs
  • crates/uhura-core/src/ir.rs
  • crates/uhura-core/src/lib.rs
  • crates/uhura-core/src/provenance.rs
  • crates/uhura-core/src/render.rs
  • crates/uhura-core/src/route.rs
  • crates/uhura-core/src/runtime.rs
  • crates/uhura-core/src/state.rs
  • crates/uhura-core/src/step.rs
  • crates/uhura-core/src/template.rs
  • crates/uhura-core/src/trace.rs
  • crates/uhura-core/src/typed.rs
  • crates/uhura-core/src/value.rs
  • crates/uhura-core/src/view.rs
  • crates/uhura-core/tests/eval_trace.rs
  • crates/uhura-core/tests/txn_matrix.rs
  • crates/uhura-editor-model/Cargo.toml
  • crates/uhura-editor-model/src/interaction_graph.rs
  • crates/uhura-editor-model/src/lib.rs
  • crates/uhura-editor-model/tests/fixtures/editor-state.json
  • crates/uhura-fixture/Cargo.toml
  • crates/uhura-fixture/clippy.toml
  • crates/uhura-fixture/src/driver.rs
  • crates/uhura-fixture/src/lib.rs
  • crates/uhura-fixture/src/script.rs
  • crates/uhura-fixture/tests/driver.rs
  • crates/uhura-host/Cargo.toml
  • crates/uhura-host/src/lib.rs
  • crates/uhura-host/src/source.rs
  • crates/uhura-port/src/canonical.rs
  • crates/uhura-port/src/contract.rs
  • crates/uhura-port/src/envelope.rs
  • crates/uhura-port/src/lib.rs
  • crates/uhura-port/src/load.rs
  • crates/uhura-port/src/route.rs
  • crates/uhura-port/src/standard.rs
  • crates/uhura-port/src/types.rs
  • crates/uhura-syntax/Cargo.toml
  • crates/uhura-syntax/src/ast.rs
  • crates/uhura-syntax/src/css.rs
  • crates/uhura-syntax/src/cursor.rs
  • crates/uhura-syntax/src/format.rs
  • crates/uhura-syntax/src/lib.rs
  • crates/uhura-syntax/src/parser/dsl.rs
  • crates/uhura-syntax/src/parser/examples.rs
  • crates/uhura-syntax/src/parser/expr.rs
  • crates/uhura-syntax/src/parser/markup.rs
  • crates/uhura-syntax/src/parser/mod.rs
  • crates/uhura-syntax/src/parser/stream.rs
  • crates/uhura-syntax/src/token.rs
  • crates/uhura-syntax/src/v04/ast.rs
  • crates/uhura-syntax/src/v04/format.rs
  • crates/uhura-syntax/src/v04/lexer.rs
  • crates/uhura-syntax/src/v04/mod.rs
  • crates/uhura-syntax/src/v04/parser.rs
  • crates/uhura-syntax/src/v04/ui.rs
  • crates/uhura-syntax/tests/comments_docs_annotations.rs
  • crates/uhura-syntax/tests/common/normative_sources.rs
  • crates/uhura-syntax/tests/fixtures/v04-feed-ui.uhura
  • crates/uhura-syntax/tests/fmt_roundtrip.rs
  • crates/uhura-syntax/tests/navigation.rs
  • crates/uhura-syntax/tests/parse_normative.rs
  • crates/uhura-syntax/tests/v04_format.rs
  • crates/uhura-syntax/tests/v04_instagram.rs
  • crates/uhura-syntax/tests/v04_lexer.rs
  • crates/uhura-syntax/tests/v04_parser.rs
  • crates/uhura-syntax/tests/v04_programs.rs
  • crates/uhura-syntax/tests/v04_ui.rs
  • crates/uhura-tests/Cargo.toml
  • crates/uhura-tests/README.md
  • crates/uhura-tests/goldens/m2/instagram-ir.json
  • crates/uhura-tests/goldens/m2/reject-alt-xor-decorative.txt
  • crates/uhura-tests/goldens/m2/reject-class-rooting-violation.txt
  • crates/uhura-tests/goldens/m2/reject-controlled-promotion.txt
  • crates/uhura-tests/goldens/m2/reject-decorative-is-a-marker.txt
  • crates/uhura-tests/goldens/m2/reject-event-on-layout.txt
  • crates/uhura-tests/goldens/m2/reject-image-text-alternative-required.txt
  • crates/uhura-tests/goldens/m2/reject-legacy-image-element.txt
  • crates/uhura-tests/goldens/m2/reject-legacy-text-field-element.txt
  • crates/uhura-tests/goldens/m2/reject-missing-availability-arm.txt
  • crates/uhura-tests/goldens/m2/reject-nested-interactive.txt
  • crates/uhura-tests/goldens/m2/reject-non-exhaustive-union-match.txt
  • crates/uhura-tests/goldens/m2/reject-unbound-required-prop.txt
  • crates/uhura-tests/goldens/m2/reject-undeclared-component-emit.txt
  • crates/uhura-tests/goldens/m2/reject-undefined-class-warning.txt
  • crates/uhura-tests/goldens/m2/reject-unguarded-projection-read.txt
  • crates/uhura-tests/goldens/m2/reject-unkeyed-each.txt
  • crates/uhura-tests/goldens/m2/reject-unknown-element.txt
  • crates/uhura-tests/goldens/m2/reject-unknown-icon.txt
  • crates/uhura-tests/goldens/m2/reject-unreachable-handler.txt
  • crates/uhura-tests/goldens/m2/reject-unresolved-name-did-you-mean.txt
  • crates/uhura-tests/goldens/m3/v-bottom-nav-create-active.json
  • crates/uhura-tests/goldens/m3/v-bottom-nav-feed-active.json
  • crates/uhura-tests/goldens/m3/v-bottom-nav-profile-active.json
  • crates/uhura-tests/goldens/m3/v-bottom-nav-reels-active.json
  • crates/uhura-tests/goldens/m3/v-bottom-nav-search-active.json
  • crates/uhura-tests/goldens/m3/v-comment-row-pending.json
  • crates/uhura-tests/goldens/m3/v-comment-row-settled.json
  • crates/uhura-tests/goldens/m3/v-comments-sheet-empty.json
  • crates/uhura-tests/goldens/m3/v-comments-sheet-populated.json
  • crates/uhura-tests/goldens/m3/v-connection-row-follow-action.json
  • crates/uhura-tests/goldens/m3/v-connection-row-following.json
  • crates/uhura-tests/goldens/m3/v-connection-row-pending.json
  • crates/uhura-tests/goldens/m3/v-create-empty.json
  • crates/uhura-tests/goldens/m3/v-create-loading.json
  • crates/uhura-tests/goldens/m3/v-create-uploaded.json
  • crates/uhura-tests/goldens/m3/v-feed-empty.json
  • crates/uhura-tests/goldens/m3/v-feed-exhausted.json
  • crates/uhura-tests/goldens/m3/v-feed-failed.json
  • crates/uhura-tests/goldens/m3/v-feed-first-page.json
  • crates/uhura-tests/goldens/m3/v-feed-loading.json
  • crates/uhura-tests/goldens/m3/v-notice-bar-refusal.json
  • crates/uhura-tests/goldens/m3/v-post-card-carousel-liked.json
  • crates/uhura-tests/goldens/m3/v-post-card-image-post.json
  • crates/uhura-tests/goldens/m3/v-post-card-like-pending.json
  • crates/uhura-tests/goldens/m3/v-post-card-save-pending.json
  • crates/uhura-tests/goldens/m3/v-post-card-video-post.json
  • crates/uhura-tests/goldens/m3/v-post-lena.json
  • crates/uhura-tests/goldens/m3/v-post-loading.json
  • crates/uhura-tests/goldens/m3/v-post-profile-history.json
  • crates/uhura-tests/goldens/m3/v-profile-followers-lena.json
  • crates/uhura-tests/goldens/m3/v-profile-followers-loading.json
  • crates/uhura-tests/goldens/m3/v-profile-followers-mira.json
  • crates/uhura-tests/goldens/m3/v-profile-following-lena.json
  • crates/uhura-tests/goldens/m3/v-profile-following-loading.json
  • crates/uhura-tests/goldens/m3/v-profile-following-mira.json
  • crates/uhura-tests/goldens/m3/v-profile-header-follow-pending.json
  • crates/uhura-tests/goldens/m3/v-profile-header-lena.json
  • crates/uhura-tests/goldens/m3/v-profile-header-self.json
  • crates/uhura-tests/goldens/m3/v-profile-lena-posts.json
  • crates/uhura-tests/goldens/m3/v-profile-loading.json
  • crates/uhura-tests/goldens/m3/v-profile-nils-posts.json
  • crates/uhura-tests/goldens/m3/v-profile-self.json
  • crates/uhura-tests/goldens/m3/v-reel-card-aurora.json
  • crates/uhura-tests/goldens/m3/v-reel-card-court.json
  • crates/uhura-tests/goldens/m3/v-reel-card-save-pending.json
  • crates/uhura-tests/goldens/m3/v-reels-loading.json
  • crates/uhura-tests/goldens/m3/v-reels-videos.json
  • crates/uhura-tests/goldens/m3/v-search-empty-explore.json
  • crates/uhura-tests/goldens/m3/v-search-explore.json
  • crates/uhura-tests/goldens/m3/v-search-loading.json
  • crates/uhura-tests/goldens/m3/v-stories-tray-tray.json
  • crates/uhura-tests/goldens/m3/v-story-lena-last.json
  • crates/uhura-tests/goldens/m3/v-story-lena-middle.json
  • crates/uhura-tests/goldens/m3/v-story-loading.json
  • crates/uhura-tests/goldens/m3/v-story-seen.json
  • crates/uhura-tests/goldens/m3/v-story-self-middle-seen.json
  • crates/uhura-tests/goldens/m3/v-story-unseen.json
  • crates/uhura-tests/goldens/m4/trace-comment-ok.jsonl
  • crates/uhura-tests/goldens/m4/trace-feed-empty.jsonl
  • crates/uhura-tests/goldens/m4/trace-feed-failed.jsonl
  • crates/uhura-tests/goldens/m4/trace-like-ok.jsonl
  • crates/uhura-tests/goldens/m4/trace-like-refused.jsonl
  • crates/uhura-tests/goldens/m4/trace-paginate.jsonl
  • crates/uhura-tests/goldens/m4/v-comments-sheet-composing.json
  • crates/uhura-tests/goldens/m4/v-comments-sheet-empty-composing.json
  • crates/uhura-tests/goldens/m4/v-comments-sheet-empty-pending.json
  • crates/uhura-tests/goldens/m4/v-comments-sheet-pending-append.json
  • crates/uhura-tests/goldens/m4/v-comments-sheet-rejected.json
  • crates/uhura-tests/goldens/m4/v-create-choosing.json
  • crates/uhura-tests/goldens/m4/v-create-composed.json
  • crates/uhura-tests/goldens/m4/v-create-publish-refused.json
  • crates/uhura-tests/goldens/m4/v-create-publishing.json
  • crates/uhura-tests/goldens/m4/v-feed-appended.json
  • crates/uhura-tests/goldens/m4/v-feed-comments-open.json
  • crates/uhura-tests/goldens/m4/v-feed-like-pending.json
  • crates/uhura-tests/goldens/m4/v-feed-like-refused.json
  • crates/uhura-tests/goldens/m4/v-feed-load-failed.json
  • crates/uhura-tests/goldens/m4/v-feed-load-pending.json
  • crates/uhura-tests/goldens/m4/v-feed-save-pending.json
  • crates/uhura-tests/goldens/m4/v-feed-unsave-pending.json
  • crates/uhura-tests/goldens/m4/v-post-comments-open.json
  • crates/uhura-tests/goldens/m4/v-post-like-pending.json
  • crates/uhura-tests/goldens/m4/v-post-save-pending.json
  • crates/uhura-tests/goldens/m4/v-profile-followers-follow-pending.json
  • crates/uhura-tests/goldens/m4/v-profile-lena-tagged.json
  • crates/uhura-tests/goldens/m4/v-profile-nils-reels.json
  • crates/uhura-tests/goldens/m4/v-profile-nils-tagged-empty.json
  • crates/uhura-tests/goldens/m4/v-profile-self-reels.json
  • crates/uhura-tests/goldens/m4/v-profile-self-saved.json
  • crates/uhura-tests/goldens/m4/v-profile-self-tagged.json
  • crates/uhura-tests/goldens/m4/v-reels-like-pending.json
  • crates/uhura-tests/goldens/m4/v-reels-save-pending.json
  • crates/uhura-tests/goldens/m4/v-reels-unsave-pending.json
  • crates/uhura-tests/goldens/m4/v-search-nils-results.json
  • crates/uhura-tests/goldens/m4/v-search-no-results.json
  • crates/uhura-tests/goldens/m4/v-search-searching.json
  • crates/uhura-tests/goldens/m4/v-story-marking-seen.json
  • crates/uhura-tests/src/lib.rs
  • crates/uhura-tests/tests/a0_v04.rs
  • crates/uhura-tests/tests/acceptance_feed.rs
  • crates/uhura-tests/tests/comments_authoring.rs
  • crates/uhura-tests/tests/common/corpus.rs
  • crates/uhura-tests/tests/diagnostic_goldens.rs
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/name-resolution.json
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/name-resolution.uhura
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/parse-fix-declaration-typo.json
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/parse-fix-declaration-typo.uhura
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/parse-invalid-expression.json
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/parse-invalid-expression.uhura
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/type-mismatch.json
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/type-mismatch.uhura
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/ui-content.json
  • crates/uhura-tests/tests/fixtures/diagnostics/v04/ui-content.uhura
  • crates/uhura-tests/tests/instagram.rs
  • crates/uhura-tests/tests/interaction_graph.rs
  • crates/uhura-tests/tests/m2_gates.rs
  • crates/uhura-tests/tests/m3_gates.rs
  • crates/uhura-tests/tests/m4_gates.rs
  • crates/uhura-tests/tests/purity.rs
  • crates/uhura-tests/tests/ui_catalog.rs
  • crates/uhura-wasm/Cargo.toml
  • crates/uhura-wasm/src/lib.rs
  • crates/uhura-wasm/src/session.rs
  • crates/uhura-wasm/tests/abi_contract.rs
  • crates/uhura-wasm/tests/dispatch_scaling.rs
  • docs/README.md
  • docs/doctrine/mission.md
  • docs/implementation/README.md
  • docs/rfcs/0001-project-foundation.md
  • docs/rfcs/0002-model-driven-editor-live-updates.md
  • docs/rfcs/0003-source-comments-docs-and-annotations.md
  • docs/rfcs/0004-standalone-machine-core-and-source-composition.md
  • docs/rfcs/README.md
  • docs/spec/README.md
  • docs/spec/drafts/0.4/README.md
  • docs/spec/drafts/0.4/acquisition/README.md
  • docs/spec/drafts/0.4/acquisition/arms/rust/examples.uhura
  • docs/spec/drafts/0.4/acquisition/arms/rust/reference.md
  • docs/spec/drafts/0.4/acquisition/arms/rust/scaffolds/02-l1.uhura
  • docs/spec/drafts/0.4/acquisition/arms/rust/scaffolds/03-l2.uhura
  • docs/spec/drafts/0.4/acquisition/arms/rust/scaffolds/04-false-friends.md
  • docs/spec/drafts/0.4/acquisition/arms/rust/scaffolds/05-a0.uhura
  • docs/spec/drafts/0.4/acquisition/arms/typescript/examples.ts
  • docs/spec/drafts/0.4/acquisition/arms/typescript/reference.md
  • docs/spec/drafts/0.4/acquisition/arms/typescript/scaffolds/02-l1.ts
  • docs/spec/drafts/0.4/acquisition/arms/typescript/scaffolds/03-l2.ts
  • docs/spec/drafts/0.4/acquisition/arms/typescript/scaffolds/04-false-friends.md
  • docs/spec/drafts/0.4/acquisition/arms/typescript/scaffolds/05-a0.ts
  • docs/spec/drafts/0.4/acquisition/common/response-format.md
  • docs/spec/drafts/0.4/acquisition/common/semantic-overview.md
  • docs/spec/drafts/0.4/acquisition/oracles/comprehension.json
  • docs/spec/drafts/0.4/acquisition/oracles/false-friends.json
  • docs/spec/drafts/0.4/acquisition/oracles/semantic-rubric.json
  • docs/spec/drafts/0.4/acquisition/protocol.json
  • docs/spec/drafts/0.4/acquisition/results/README.md
  • docs/spec/drafts/0.4/acquisition/run.mjs
  • docs/spec/drafts/0.4/acquisition/tasks/00-comprehension.md
  • docs/spec/drafts/0.4/acquisition/tasks/01-l0-author.md
  • docs/spec/drafts/0.4/acquisition/tasks/02-l1-transfer.md
  • docs/spec/drafts/0.4/acquisition/tasks/03-l2-transfer.md
  • docs/spec/drafts/0.4/acquisition/tasks/04-false-friends.md
  • docs/spec/drafts/0.4/acquisition/tasks/05-a0-change-rehearsal.md
  • docs/spec/drafts/0.4/application.md
  • docs/spec/drafts/0.4/conformance.md
  • docs/spec/drafts/0.4/grammar.ebnf
  • docs/spec/drafts/0.4/kernel.md
  • docs/spec/drafts/0.4/project.md
  • docs/spec/drafts/0.4/source.md
  • docs/spec/drafts/relay-b3/README.md
  • docs/spec/drafts/v0.md
  • docs/studies/README.md
  • docs/studies/escape-hatches-and-foreign-bindings.md
  • docs/studies/instagram-demo-dogfood.md
  • docs/studies/instagram-spike-design.md
  • docs/studies/language-necessity-and-surface-reuse.md
  • docs/studies/machine-first-language-and-opt-in-ui.md
  • docs/widgets/README.md
  • docs/widgets/drafts/0.4/README.md
  • docs/widgets/drafts/v0/README.md
  • docs/widgets/drafts/v0/elements/button.md
  • docs/widgets/drafts/v0/elements/icon.md
  • docs/widgets/drafts/v0/elements/img.md
  • docs/widgets/drafts/v0/elements/scroll.md
  • docs/widgets/drafts/v0/elements/view.md
  • docs/widgets/drafts/v0/integrations/icon-font.md
  • docs/widgets/elements/README.md
  • docs/widgets/integrations/README.md
  • examples/README.md
  • examples/applications/README.md
  • examples/applications/a0-return-desk/README.md
  • examples/applications/a0-return-desk/answers/uhura-0.4/README.md
  • examples/applications/a0-return-desk/answers/uhura-0.4/evidence-support.uhura
  • examples/applications/a0-return-desk/answers/uhura-0.4/evidence/conformance.uhura
  • examples/applications/a0-return-desk/answers/uhura-0.4/host.toml
  • examples/applications/a0-return-desk/answers/uhura-0.4/machine.uhura
  • examples/applications/a0-return-desk/answers/uhura-0.4/provider.mjs
  • examples/applications/a0-return-desk/answers/uhura-0.4/uhura.toml
  • examples/applications/a0-return-desk/answers/uhura-0.4/ui.uhura
  • examples/applications/a0-return-desk/reference-oracle/README.md
  • examples/applications/a0-return-desk/reference-oracle/model.mjs
  • examples/applications/a0-return-desk/reference-oracle/validate.mjs
  • examples/instagram/README.md
  • examples/instagram/client/README.md
  • examples/instagram/client/app/create/page.examples.uhura
  • examples/instagram/client/app/create/page.uhura
  • examples/instagram/client/app/feed/page.examples.uhura
  • examples/instagram/client/app/feed/page.uhura
  • examples/instagram/client/app/post/[id]/page.examples.uhura
  • examples/instagram/client/app/post/[id]/page.uhura
  • examples/instagram/client/app/profile/[user]/followers/page.examples.uhura
  • examples/instagram/client/app/profile/[user]/followers/page.uhura
  • examples/instagram/client/app/profile/[user]/following/page.examples.uhura
  • examples/instagram/client/app/profile/[user]/following/page.uhura
  • examples/instagram/client/app/profile/[user]/page.examples.uhura
  • examples/instagram/client/app/profile/[user]/page.uhura
  • examples/instagram/client/app/reels/page.examples.uhura
  • examples/instagram/client/app/reels/page.uhura
  • examples/instagram/client/app/search/page.examples.uhura
  • examples/instagram/client/app/search/page.uhura
  • examples/instagram/client/app/story/[id]/page.examples.uhura
  • examples/instagram/client/app/story/[id]/page.uhura
  • examples/instagram/client/catalog/base.toml
  • examples/instagram/client/components/bottom-nav.examples.uhura
  • examples/instagram/client/components/bottom-nav.uhura
  • examples/instagram/client/components/comment-row.examples.uhura
  • examples/instagram/client/components/comment-row.uhura
  • examples/instagram/client/components/connection-row.examples.uhura
  • examples/instagram/client/components/connection-row.uhura
  • examples/instagram/client/components/notice-bar.examples.uhura
  • examples/instagram/client/components/notice-bar.uhura
  • examples/instagram/client/components/post-card.examples.uhura
  • examples/instagram/client/components/post-card.uhura
  • examples/instagram/client/components/profile-header.examples.uhura
  • examples/instagram/client/components/profile-header.uhura
  • examples/instagram/client/components/reel-card.examples.uhura
  • examples/instagram/client/components/reel-card.uhura
  • examples/instagram/client/components/stories-tray.examples.uhura
  • examples/instagram/client/components/stories-tray.uhura
  • examples/instagram/client/evidence.uhura
  • examples/instagram/client/fixtures/assets/manifest.toml
  • examples/instagram/client/fixtures/scripts/comment-ok.toml
  • examples/instagram/client/fixtures/scripts/demo.toml
  • examples/instagram/client/fixtures/scripts/feed-empty.toml
  • examples/instagram/client/fixtures/scripts/feed-failed.toml
  • examples/instagram/client/fixtures/scripts/like-ok.toml
  • examples/instagram/client/fixtures/scripts/like-refused.toml
  • examples/instagram/client/fixtures/scripts/paginate.toml
  • examples/instagram/client/fixtures/standard.toml
  • examples/instagram/client/host.toml
  • examples/instagram/client/machine.uhura
  • examples/instagram/client/parts.uhura
  • examples/instagram/client/ports/comments.port.toml
  • examples/instagram/client/ports/create.port.toml
  • examples/instagram/client/ports/feed.port.toml
  • examples/instagram/client/ports/profile.port.toml
  • examples/instagram/client/providers/spock.test.ts
  • examples/instagram/client/providers/spock.ts
  • examples/instagram/client/styles/theme.css
  • examples/instagram/client/surfaces/comments-sheet.examples.uhura
  • examples/instagram/client/surfaces/comments-sheet.uhura
  • examples/instagram/client/uhura.toml
  • examples/instagram/client/ui.uhura
  • examples/programs/README.md
  • examples/programs/answers/uhura-0.4/README.md
  • examples/programs/answers/uhura-0.4/programs.uhura
  • examples/programs/answers/uhura-0.4/uhura.toml
  • examples/programs/l0-counter/README.md
  • examples/programs/l1-river-crossing/README.md
  • examples/programs/l2-task-supervisor/README.md
  • resources/ui-catalog/0.4.json
  • scripts/build-wasm.sh
  • scripts/parity.mjs
  • web/README.md
  • web/src/app/location.ts
  • web/src/app/main.ts
  • web/src/app/router.test.ts
  • web/src/app/router.ts
  • web/src/editor/annotation-overlay.ts
  • web/src/editor/display-labels.ts
  • web/src/editor/editor-authoring.ts
  • web/src/editor/editor-board.ts
  • web/src/editor/editor-realization.ts
  • web/src/editor/editor-state.ts
  • web/src/editor/editor-styles.ts
  • web/src/editor/editor.ts
  • web/src/editor/machine-inspection.ts
  • web/src/editor/structure-connectors.ts
  • web/src/editor/surface-hierarchy.ts
  • web/src/editor/tests/annotation-overlay.test.ts
  • web/src/editor/tests/display-labels.test.ts
  • web/src/editor/tests/editor-authoring.test.ts
  • web/src/editor/tests/editor-board.test.ts
  • web/src/editor/tests/editor-focus.test.ts
  • web/src/editor/tests/editor-icons.test.ts
  • web/src/editor/tests/editor-realization.test.ts
  • web/src/editor/tests/editor-state.test.ts
  • web/src/editor/tests/editor-updates.test.ts
  • web/src/editor/tests/fixtures/projection.ts
  • web/src/editor/tests/machine-inspection.test.ts
  • web/src/editor/tests/structure-connectors.test.ts
  • web/src/editor/tests/surface-hierarchy.test.ts
  • web/src/editor/tests/workflow-connectors.test.ts
  • web/src/editor/workflow-connectors.ts
  • web/src/play/TODO.md
  • web/src/play/adapter-host.test.ts
  • web/src/play/adapter-host.ts
  • web/src/play/application-location.test.ts
  • web/src/play/application-location.ts
  • web/src/play/browser-adapters.test.ts
  • web/src/play/browser-adapters.ts
  • web/src/play/chrome.ts
  • web/src/play/debug-controller.ts
  • web/src/play/debug-layout.ts
  • web/src/play/debug-model.ts
  • web/src/play/debug-surface.ts
  • web/src/play/focus.ts
  • web/src/play/inspection-store.ts
  • web/src/play/main.test.ts
  • web/src/play/main.ts
  • web/src/play/play-provider-selection.ts
  • web/src/play/provider.test.ts
  • web/src/play/provider.ts
  • web/src/play/pump.ts
  • web/src/play/scroll.ts
  • web/src/play/session.test.ts
  • web/src/play/session.ts
  • web/src/play/shell.css
  • web/src/play/shell.ts
  • web/src/play/styles.d.ts
  • web/src/play/surfaces.ts
  • web/src/play/system-controls.ts
  • web/src/play/tests/assets.test.ts
  • web/src/play/tests/chrome.test.ts
  • web/src/play/tests/debug-controller.test.ts
  • web/src/play/tests/debug-layout.test.ts
  • web/src/play/tests/debug-model.test.ts
  • web/src/play/tests/inspection-fixture.ts
  • web/src/play/tests/inspection-store.test.ts
  • web/src/play/tests/lifecycle.test.ts
  • web/src/play/tests/machine-debug-model.test.ts
  • web/src/play/tests/play-provider-selection.test.ts
  • web/src/play/tests/scroll.test.ts
  • web/src/play/tests/shell.test.ts
  • web/src/play/tests/system-controls.test.ts
  • web/src/play/tests/video-applier.test.ts
  • web/src/play/textfield.ts
  • web/src/play/ticks.ts
  • web/src/protocol/evidence-summary.ts
  • web/src/protocol/host-inspection.test.ts
  • web/src/protocol/host-inspection.ts
  • web/src/protocol/interaction-graph.test.ts
  • web/src/protocol/interaction-graph.ts
  • web/src/protocol/machine.test.ts
  • web/src/protocol/machine.ts
  • web/src/protocol/provenance.test.ts
  • web/src/protocol/provenance.ts
  • web/src/protocol/types.ts
  • web/src/protocol/wasm.d.ts
  • web/src/renderer/appliers.ts
  • web/src/renderer/assets.ts
  • web/src/renderer/contracts.ts
  • web/src/renderer/editor.ts
  • web/src/renderer/play.ts
  • web/src/renderer/primitives/base.css
  • web/src/renderer/primitives/button.ts
  • web/src/renderer/primitives/common.ts
  • web/src/renderer/primitives/icon.ts
  • web/src/renderer/primitives/image.ts
  • web/src/renderer/primitives/pager.ts
  • web/src/renderer/primitives/region.ts
  • web/src/renderer/primitives/registry.ts
  • web/src/renderer/primitives/scroll.ts
  • web/src/renderer/primitives/text.ts
  • web/src/renderer/primitives/textfield.ts
  • web/src/renderer/primitives/types.ts
  • web/src/renderer/primitives/video.ts
  • web/src/renderer/primitives/view.ts
  • web/src/renderer/projection.test.ts
  • web/src/renderer/projection.ts
  • web/src/renderer/reconciler.ts
  • web/src/renderer/tests/policies.test.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/uhura-0.4-language-rewrite

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@k08200

k08200 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

We measured v0's L0 frictions empirically: a machine cannot exist without a view (UH5011); configuration must be hardcoded into guards; the input domain is defined by the view's descriptors rather than a machine declaration (the trace harness rejects an input no control emits); and a guard miss dispatches no handler and carries no named result (selected: null, no writes — the trace records the miss, the program cannot name it). We also verified from source that v0 stores are definition-scoped. 0.4 resolves each with a named construct (config/require, closed events, named outcomes, standalone machine.uhura, conformance.md:70's result taxonomy). No objections to the direction.

FYI on our open items — no action needed from you: we'll rework #18 on top of 0.4 after this merges, we're withdrawing the video question in #22 (the contradiction is deleted on this branch), and we'll re-target or close #23 ourselves.

One question only you can answer: the v0 gaps we verified (unvalidated modality, pager's never-wired page-change, aria-label-only naming, textfield's uncontrolled-draft hole) — are these intended to become ui-contract obligations in 0.4, or do they dissolve with the catalog?

Copy link
Copy Markdown
Member Author

Thanks — this is a useful boundary question.

For this PR I am deliberately keeping the scope on the machine-first language redesign. ui is an opt-in layer and should have its own sub-specification. I am not trying to settle the inherited widget catalogue, modality, accessibility, or renderer contracts in this PR, and nothing below should be read as locking their 0.4 design.

The one “rule of physics” I do want the core language to impose is the state-ownership boundary:

  • durable, program-observable state belongs to the machine;
  • the UI may own ephemeral interaction mechanics;
  • observations flow from the machine into the UI;
  • semantic user intent returns through explicit, typed machine inputs;
  • the UI must not silently retain or mutate state on which program behavior depends.

<textfield> / <input> is a useful example because it exposes nearly the whole paradigm.

If the draft affects validation, another control's disabled state, search-as-you-type, persistence, deterministic replay, or a static example, then the draft is machine state. A possible controlled spelling is the one this branch currently demonstrates:

state {
  draft: Text = "",
}

observe {
  draft,
}

on DraftChanged(value) {
  draft = value;
  Accepted
}
<textfield
  value={view.draft}
  on change -> DraftChanged(event.text)
/>

The renderer can still own caret position, selection, IME composition, and a temporary in-flight editing buffer. Those are interaction mechanics, not application state. Once the machine accepts the input, its projected value is authoritative; rejection or normalization is also expressed through the machine transition rather than hidden widget mutation.

An uncontrolled field is not necessarily forbidden. It would mean something different and should be explicit: the renderer owns the draft until a boundary such as commit(text) or submit(text), and the machine cannot observe, validate, replay, or snapshot the intermediate value. Whether 0.4 supports that mode, what syntax it uses, whether change is per edit or per commit, and whether binding sugar exists are all still UI-sub-spec decisions.

The same state-ownership rule can inform pager, but modality and accessible naming are different UI-contract concerns. In particular, I do not consider v0's under-specified modality string to create a compatibility obligation. The eventual ui sub-spec and code owner(s) should be free to redesign, omit, or replace those concepts cleanly, while respecting the core state/input boundary above.

So the direct answer is: I do not intend this PR to decide whether those v0 gaps become 0.4 UI obligations. They remain open for the dedicated ui design. My focus here, at least for now, is the machine language and the general physics that any later UI contract must compose with.

@softmarshmallow
softmarshmallow marked this pull request as ready for review July 20, 2026 19:10
@softmarshmallow
softmarshmallow merged commit 896aa6b into main Jul 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants